Telegram Group & Telegram Channel
#سوال

اینو حتماً شنیدید:
توی پایتون GIL باعث می‌شه multi-thread واقعی نداشته باشیم.

حالا من چندتا سوال سطح بالاتر می‌پرسم، می‌خوام این سوالا رو توی مصاحبه‌های سطح سنیور و مید استفاده کنم :


۱- مگر نه اینکه GIL باعث میشه در لحظه فقط یک thread توی پایتون اجرا بشه؟ پس چرا کتابخونه threading داریم ؟

۲- توی یک برنامه کاملاً پایتونی ( fortran, C, ... درگیر نباشه) بنظر شما کدوم مورد سریعتر هست و چرا ؟

threading یا asynchronous

۳- حالتی به ذهنت می‌رسه که توی یک کد کاملا پایتونی استفاده از threading بهتر از asynchronous باشه ؟


چرا این سوالات ؟ چون خسته شدم انقدر که سخت‌ترین سوال مصاحبه این بود که؛
کی از threading استفاده کنیم کی از multi-process ؟
گفتم چندتا سوال خوب برای مصاحبه طرح کنم، البته دارم روش کار می‌کنم.
۴-۵ تا دیگه اضافه می‌شه



tg-me.com/pyHints/782
Create:
Last Update:

#سوال

اینو حتماً شنیدید:
توی پایتون GIL باعث می‌شه multi-thread واقعی نداشته باشیم.

حالا من چندتا سوال سطح بالاتر می‌پرسم، می‌خوام این سوالا رو توی مصاحبه‌های سطح سنیور و مید استفاده کنم :


۱- مگر نه اینکه GIL باعث میشه در لحظه فقط یک thread توی پایتون اجرا بشه؟ پس چرا کتابخونه threading داریم ؟

۲- توی یک برنامه کاملاً پایتونی ( fortran, C, ... درگیر نباشه) بنظر شما کدوم مورد سریعتر هست و چرا ؟

threading یا asynchronous

۳- حالتی به ذهنت می‌رسه که توی یک کد کاملا پایتونی استفاده از threading بهتر از asynchronous باشه ؟


چرا این سوالات ؟ چون خسته شدم انقدر که سخت‌ترین سوال مصاحبه این بود که؛
کی از threading استفاده کنیم کی از multi-process ؟
گفتم چندتا سوال خوب برای مصاحبه طرح کنم، البته دارم روش کار می‌کنم.
۴-۵ تا دیگه اضافه می‌شه

BY Python Hints


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/pyHints/782

View MORE
Open in Telegram


Python Hints Telegram | DID YOU KNOW?

Date: |

Telegram Be The Next Best SPAC

I have no inside knowledge of a potential stock listing of the popular anti-Whatsapp messaging app, Telegram. But I know this much, judging by most people I talk to, especially crypto investors, if Telegram ever went public, people would gobble it up. I know I would. I’m waiting for it. So is Sergei Sergienko, who claims he owns $800,000 of Telegram’s pre-initial coin offering (ICO) tokens. “If Telegram does a SPAC IPO, there would be demand for this issue. It would probably outstrip the interest we saw during the ICO. Why? Because as of right now Telegram looks like a liberal application that can accept anyone - right after WhatsApp and others have turn on the censorship,” he says.

Telegram announces Anonymous Admins

The cloud-based messaging platform is also adding Anonymous Group Admins feature. As per Telegram, this feature is being introduced for safer protests. As per the Telegram blog post, users can “Toggle Remain Anonymous in Admin rights to enable Batman mode. The anonymized admin will be hidden in the list of group members, and their messages in the chat will be signed with the group name, similar to channel posts.”

Python Hints from br


Telegram Python Hints
FROM USA